home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / Pascal / Book Demos in Pascal / SpriteEngine / SE Simple / SpriteStructure.p < prev   
Encoding:
Text File  |  1995-04-04  |  676 b   |  28 lines  |  [TEXT/MWPS]

  1. unit SpriteStructure;
  2.  
  3. {This unit defines the SpriteRecord structure. It i a separate unit since it}
  4. {is likely to be edited.}
  5.  
  6. interface
  7.  
  8. {$setc _hasfixedpoint := false}
  9.  
  10. {$IFC UNDEFINED THINK_PASCAL}
  11.     uses Types, QuickDraw;
  12. {$ENDC}
  13.  
  14.     type
  15.         SpritePtr = ^SpriteRecord;
  16.         SpriteRecord = record
  17. (*Game entity data - edit as desired*)
  18.                 speed: Point;                (* Fixed-point! *)
  19. (*Sprite data - don't remove*)
  20.                 position: Point;            (* Integer screen coordinates! *)
  21.                 face: GrafPtr;                (* Apprearance of the sprite *)
  22.                 drawingRect: Rect;        (* Where is it? *)
  23. (*List pointers - don't remove*)
  24.                 prev, next: SpritePtr;        (* Next enity in the list *)
  25.             end;
  26.  
  27. implementation
  28. end.